home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / mac / FILES / SHARED.CST / 00404_Script_Scrapbook parent < prev    next >
Text File  |  1997-07-24  |  3KB  |  82 lines

  1. -- o ScrpBook 
  2.  
  3.  
  4.  
  5. property pLabelTxtCast, pDescriptionTxtCast, pInstructionTxtCast
  6. property pCurrPage, pActiveTextDB, pNumOfPages, pPageSnd
  7.  
  8. global gActiveInventor, gUtilityObj,gInventorIndexNum
  9. --------------------------------------------------------------------------------------------------------------------
  10. on mInit me
  11.   
  12.   set pLabelTxtCast = the number of cast "labelTxt"
  13.   set pDescriptionTxtCast = the number of cast "descrTxt"
  14.   set pInstructionTxtCast =  the number of cast "instrTxt"
  15.   set pPageSnd = 1392
  16.   return( me )
  17.   
  18. end mInit
  19. --------------------------------------------------------------------------------------------------------------------
  20.  
  21. on  mActivate me
  22.   
  23.   if gInventorIndexNum = 1 then 
  24.     set pNumOfPages = 7
  25.     set pActiveTextDB = the text of cast "Edison Scrapbook Text"
  26.   else if gInventorIndexNum = 2 then 
  27.     set pNumOfPages = 13
  28.     set pActiveTextDB = the text of cast "Bell ScrapBook Text"
  29.   else if gInventorIndexNum = 3 then 
  30.     set pNumOfPages = 4
  31.     set pActiveTextDB = the text of cast "Watt Scrapbook Text"
  32.   end if
  33.   
  34.   set pCurrPage = 0
  35.   mSetCursors(gUtilityObj, [7:#operate])
  36.   
  37. end mActivate 
  38.  
  39. --------------------------------------------------------------------------------------------------------------------
  40. on mNextPage me
  41.  
  42.   set pCurrPage = pCurrPage + 1
  43.   puppetsound 2, pPageSnd
  44.   if  (pCurrPage = pNumOfPages)  then mUnSetOneCursor(gUtilityObj, 7)
  45.   else if (pCurrPage = 1) then mSetCursors(gUtilityObj, [7:#Finger])
  46.   else mSetCursors(gUtilityObj, [7:#Finger,#8:#finger])
  47.   
  48.   go the frame + 1
  49.   
  50.   set startline =  ((pCurrPage -1) * 6) + 1
  51.   set endline = (pCurrPage * 6)
  52.   set the text of cast pInstructionTxtCast = line startline to endline of pActiveTextDB
  53.   
  54. end mNextPage
  55. --------------------------------------------------------------------------------------------------------------------
  56. on mPrevPage me
  57.  
  58.   puppetsound 2, pPageSnd
  59.   go the frame - 1
  60.   set pCurrPage = pCurrPage - 1
  61.   
  62.   if  (pCurrPage = 1)  then mUnSetOneCursor(gUtilityObj, 8)
  63.   else if (pCurrPage = pNumOfPages) then mSetCursors(gUtilityObj, [8:#Finger])
  64.   else mSetCursors(gUtilityObj, [7:#Finger,#8:#finger])
  65.   
  66.   
  67.   set startline =  ((pCurrPage -1) * 6) + 1
  68.   set endline = (pCurrPage * 6)
  69.   set the text of cast pInstructionTxtCast = line startline to endline of pActiveTextDB
  70.   
  71. end mPrevPage
  72. --------------------------------------------------------------------------------------------------------------------
  73.  
  74. on mClose me
  75.   
  76.   sound stop 2
  77.   set the text of cast pDescriptionTxtCast = " "
  78.   
  79. end mClose
  80. --------------------------------------------------------------------------------------------------------------------
  81.  
  82.